package com.codeplay.repository;

import com.codeplay.entity.Chapter;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ChapterRepository extends JpaRepository<Chapter, Long> {
    List<Chapter> findByCourseIdOrderByOrderIndexAsc(Long courseId);
    Chapter findByCourseIdAndOrderIndex(Long courseId, Integer orderIndex);
} 